package com.lihua.project.system.comment.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.lihua.framework.aspectj.lang.annotation.Excel;
import com.lihua.framework.web.domain.BaseEntity;

/**
 * 文章评论对象 comment
 *
 * @author lihua
 * @date 2022-04-06
 */
public class Comment extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /**  */
    private Long id;

    /** 文章id */
    @Excel(name = "文章id")
    private Long articleId;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 用户名，为了减少查询 */
    @Excel(name = "用户名，为了减少查询")
    private String userName;

    /** 用户头像，减少查询 */
    @Excel(name = "用户头像，减少查询")
    private String userAvatar;

    /** 评论，限制150字符 */
    @Excel(name = "评论，限制150字符")
    private String comment;

    /** 点赞数 */
    @Excel(name = "点赞数")
    private Long praise;

    /** 评论时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "评论时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date commentTime;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setArticleId(Long articleId)
    {
        this.articleId = articleId;
    }

    public Long getArticleId()
    {
        return articleId;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setUserName(String userName)
    {
        this.userName = userName;
    }

    public String getUserName()
    {
        return userName;
    }
    public void setUserAvatar(String userAvatar)
    {
        this.userAvatar = userAvatar;
    }

    public String getUserAvatar()
    {
        return userAvatar;
    }
    public void setComment(String comment)
    {
        this.comment = comment;
    }

    public String getComment()
    {
        return comment;
    }
    public void setPraise(Long praise)
    {
        this.praise = praise;
    }

    public Long getPraise()
    {
        return praise;
    }
    public void setCommentTime(Date commentTime)
    {
        this.commentTime = commentTime;
    }

    public Date getCommentTime()
    {
        return commentTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("articleId", getArticleId())
                .append("userId", getUserId())
                .append("userName", getUserName())
                .append("userAvatar", getUserAvatar())
                .append("comment", getComment())
                .append("praise", getPraise())
                .append("commentTime", getCommentTime())
                .toString();
    }
}
